<template>
	<view class="uv-content" v-if="htmlStr">
		<uv-parse container-style="padding:0;" :content="htmlStr" :tagStyle="style" :lazyLoad="true" loadingImg="@/pages/subPackageA/static/shou-star.jpg"></uv-parse>
	</view>
</template>

<script setup>
	import {getHtmlStrApi} from "@/api/index.js"; 
	const htmlStr=ref('');
	const picId=ref('');
	const style={
		// 字符串的形式
		// p: 'color: red;font-size:32rpx',
		// span: 'font-size: 30rpx',
		
	}
	const getDetail=()=>{
		getHtmlStrApi({id:picId.value}).then(res=>{
			console.log('res-富文本内容-----',res);
			const {content,title}=res.data||{};
			uni.setNavigationBarTitle({
				title:title||'观界'
			});
			htmlStr.value=content||''; 
		})
	}
	onLoad((options)=>{
		console.log(options,'-----options---');
		picId.value=options.id;
		getDetail();
	})
</script>

<style>
</style>